<%--
  Created by IntelliJ IDEA.
  User: 刘
  Date: 2020/5/17
  Time: 13:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理员-添加教师</title>
    <jsp:include page="header.jsp"></jsp:include>
</head>
<body>
<h1 style="text-align: center">添加教师</h1>
<div class="container">
    <a class="btn btn-default" href="${pageContext.request.contextPath}/admin/queryAllTeacherServlet">返回</a>
    <a class="btn btn-default" href="${pageContext.request.contextPath}/admin/addTeachersServlet">刷新</a>
    <h4 id="msg" class="text-danger text-center">${requestScope.msg}</h4>
    <h3>方式一：单条导入</h3>
    <form action="${pageContext.request.contextPath}/admin/addTeachersServlet" method="post">
        <input type="hidden" name="type" value="single">
        <div class="form-group">
            <label for="exampleInputEmail1">教工号</label>
            <input type="text" class="form-control" id="exampleInputEmail1" name="tid" maxlength="8" required>
        </div>
        <div class="form-group">
            <label for="exampleInputPassword1">姓名</label>
            <input type="text" class="form-control" id="exampleInputPassword1" name="tname" maxlength="8" required>
        </div>
        <button type="submit" class="btn btn-default">添加</button>
    </form>
    <div>
        <h3>方式二：批量导入</h3>
        <form action="${pageContext.request.contextPath}/admin/addTeachersServlet" method="post">
            <input type="hidden" name="type" value="multi">
            <div class="form-group">
                <label for="sid_and_names">工号和姓名</label>
                <p class="help-block">输入教师的工号和姓名，每个工号和姓名一行，工号和姓名用空格或制表符分隔，除此之外不要包含其他字符。<br>
                    您可以直接从Excel表格中复制工号和姓名粘贴到这里。<br>例如：<br>20200001 张三<br>20200002 李四<br>20200003 王五</p>
                <textarea id="sid_and_names" class="form-control" name="tid_and_names" rows="10" required></textarea>
            </div>
            <input class="btn btn-block btn-primary" type="submit" value="添加">
        </form>
    </div>
</div>

<jsp:include page="../footer.jsp"></jsp:include>
</body>
</html>
